package com.zdyt.opc.common;

import org.openscada.opc.lib.da.AccessStateListener;

import java.util.concurrent.CountDownLatch;

public class TaskSartSateListener implements AccessStateListener {

    private CountDownLatch countDownLatch;

    public TaskSartSateListener(CountDownLatch countDownLatch) {
        this.countDownLatch = countDownLatch;
    }

    @Override
    public void stateChanged(boolean state) {
        if (state){
            countDownLatch.countDown();
        }
    }

    @Override
    public void errorOccured(Throwable t) {

    }
}
